package cn.krui.project.bean.article;

import com.baomidou.mybatisplus.annotation.Version;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
/**
 * @author: zc
 * email: zc8023zs@163.com
 * create_time: 2020/6/11 16:41:40
 */
@ApiModel(value = "qr_article_class", description = "栏目")
@TableName(value = "qr_article_class")
public class ArticleClass {
	@ApiModelProperty(value = "栏目id")
	@TableId(type = IdType.AUTO,value = "id")
	@NotNull(message = "栏目id不能为空")
	private Integer id;
	@ApiModelProperty(value = "上级栏目")
	@TableField(value="pid")
	private Integer pid;
	@ApiModelProperty(value = "栏目类型:资讯=1")
	@TableField(value="class_type")
	private Integer class_type;
	@ApiModelProperty(value = "栏目名称")
	@TableField(value="class_name")
	@NotNull(message = "栏目名称不能为空")
	private String class_name;
	@ApiModelProperty(value = "访问路径")
	@TableField(value="path")
	@NotNull(message = "访问路径不能为空")
	private String path;
	@ApiModelProperty(value = "显示在栏目:是=1 否=0")
	@TableField(value="display")
	private Integer display;
	@ApiModelProperty(value = "用户组id", hidden = true)
	@TableField(value="group_id")
	@NotNull(message = "用户组id不能为空")
	private Integer group_id;
	@ApiModelProperty(value = "数据版本字段")
	@TableField(value="version_id")
	@Version
	private Integer version_id;
	@ApiModelProperty(value = "树形子集")
	@TableField(exist = false)
	private List<ArticleClass> children;

 
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
 
	public Integer getPid() {
		return pid;
	}
	public void setPid(Integer pid) {
		this.pid = pid;
	}
 
	public Integer getClass_type() {
		return class_type;
	}
	public void setClass_type(Integer class_type) {
		this.class_type = class_type;
	}
 
	public String getClass_name() {
		return class_name;
	}
	public void setClass_name(String class_name) {
		this.class_name = class_name;
	}
 
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
 
	public Integer getDisplay() {
		return display;
	}
	public void setDisplay(Integer display) {
		this.display = display;
	}
 
	public Integer getGroup_id() {
		return group_id;
	}
	public void setGroup_id(Integer group_id) {
		this.group_id = group_id;
	}
 
	public Integer getVersion_id() {
		return version_id;
	}
	public void setVersion_id(Integer version_id) {
		this.version_id = version_id;
	}
 
	public List<ArticleClass> getChildren(){
		return children;
	}
	public void setChildren(List<ArticleClass> children){
		this.children = children;
	}

}